package com.wn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wn.bean.Goods;
import com.wn.bean.GoodsDTO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 查询商品
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    /**
     *  查询 商品表 商品详细表
     *
     * @return
     */
    @Select("SELECT g.*,d.description FROM goods g, goods_detail d WHERE g.goods_id=d.goods_id")
    List<GoodsDTO> queryGoodsDetail();
}